<template>
  {{ countModel }}-----
  {{ countModel1 }}
  <!-- Parent.vue -->
  <Child v-model="countModel" />
  <Child :foo="countModel1" @updateFoo="update1" />
  <button @click="update">countModel自增</button>
  <button @click="update1">countModel1自增</button>
</template>
<script setup>
import { ref } from "vue";
import Child from "./child.vue";
const countModel = ref(1);
function update() {
  countModel.value++;
}
const countModel1 = ref(0);
function update1() {
  countModel1.value++;
}
</script>
